package com.viking.service.impl;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.viking.domain.BlockExceptResult;
import com.viking.exception.MyBlockHandler;
import com.viking.service.OrderService;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

    @Override
    @SentinelResource(value = "getUser",blockHandlerClass = MyBlockHandler.class,blockHandler = "myBlockHandler")
    public BlockExceptResult getUser(Integer id) {
        return new BlockExceptResult(0,"获取用户成功！");
    }
}
